Create an event based on the RemoteSetHandler delegate

Namespace:  Equis.JanusToolkit
Assembly:  Janus (in Janus.dll)

Syntax

Remarks

An event is triggered whenever a Set or Send message is received from a remote client. The method that is called when the event is triggered receives 2 parameters:
  • the object that triggered the event
  • the TimeLine value that was being set

Examples

Set up a listener for the RemoteSet event
 Copy imageCopy Code
            // create a timeline
            myTimeLine = new PositionTimeLine("Test123");
            // every time a new value is set in the timeline "myStream" execute the function "ProcessRemoteSet"
            myStream.RemoteSet  = new PositionTimeLine.RemoteSetHandler(ProcessRemoteSet);
            
Then create a function called "ProcessRemoteSet"
 Copy imageCopy Code
            static void ProcessRemoteSet(object sender, Value<Position> v)
            {
                Position currentValue = v.Val;
                // do some stuff
            }
            

See Also